Skip to content

fix(explorer): prevent XSS in dashboard rendering#124

Merged
Scottcjn merged 1 commit intoScottcjn:mainfrom
David-code-tang:codex/explorer-xss-hardening-68
Feb 12, 2026
Merged

fix(explorer): prevent XSS in dashboard rendering#124
Scottcjn merged 1 commit intoScottcjn:mainfrom
David-code-tang:codex/explorer-xss-hardening-68

Conversation

@David-code-tang
Copy link
Contributor

Implements bounty #68 (Block Explorer & Dashboard Hardening) by mitigating DOM XSS in explorer dashboard rendering.

Issue

The explorer dashboard uses innerHTML with values derived from API responses. If a miner id or other field contains HTML, it can be injected into the page.

Fix

  • Add a small escapeHtml() helper and apply it to all user/API-derived fields rendered via innerHTML:
    • miners table wallet_short, last_seen, age
    • blocks table hash_short, timestamp
    • wallet search output and error text

Validation

  • python3 -m py_compile explorer/rustchain_dashboard.py

Bounty: Scottcjn/rustchain-bounties#68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants